From f3f998efd7538a338ca2959c21a93ec633e17737 Mon Sep 17 00:00:00 2001 From: fiddlerwoaroof Date: Thu, 3 Mar 2016 10:30:00 -0500 Subject: [PATCH] Check if XRRGetOutputInfo returned a null pointer. Fixes bug 763023: in certain circumstances, XRRGetOutputInfo will return a null pointer. This commit adds a check to detect and handle this return value. --- gdk/x11/gdkscreen-x11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 82b8aa2132..063b597922 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -653,6 +653,9 @@ init_randr15 (GdkScreen *screen) XRRGetOutputInfo (x11_screen->xdisplay, resources, output); GdkX11Monitor monitor; + if (output_info == NULL) + continue; + /* Non RandR1.2+ X driver have output name "default" */ randr12_compat |= !g_strcmp0 (output_info->name, "default"); -- 2.30.2